// import * as soundAlbumModel from '../../models/sound_album';
// import * as soundCategoryModel from '../../models/sound_category';
// import * as soundCategoryRelationModel from '../../models/book_category_relation';
import * as soundVoiceModel from '../../models/sound_voice';
import { EmptyException, ValidException } from '../../helps/exception';

/**
 * 获取绘本详细内容
 * @param {*} {voice_id}
 * @returns {*} {any}
 */
export function* getVoice({ voice_id }) {
  if (!voice_id) throw ValidException('音频id为空');
  let voice = yield soundVoiceModel.get(voice_id);
  if (!voice) throw EmptyException('音频不存在');
  return voice;
}

export function* getVoiceList() {
  return null;
}
